import * as React from 'react';
import {Datagrid} from "@/components/datagrid";
import {Form} from "@/components/form";
import {serverFetch} from "@/components/server-fetch";


export default async function Page() {
    const api_type = 'outerDetail'
    const data = await serverFetch(api_type)
    const dataJson = {
        outerDetailId: {name: '外部单号', type: 'number'},
        LPN: {name: 'LPN', type: 'string'},
        totalQuantity: {name: '总数量', type: 'number'},
        source: {name: '来源', type: 'string'},
        status: {name: '状态', type: 'string'},
        remark: {name: '备注', type: 'string'},
    }
    return (
        <main className='px-5'>
            <p className="text-3xl py-5">
                # 外层明细
            </p>
            <Datagrid rows={data.data} keyword={'outerDetailId'} list={dataJson} type={api_type}/>
            <Form list={dataJson} type={api_type}/>
        </main>
    )
}
